 <?php
            include 'connectdb.php';
            $q = "select * from home_stay where home_stay_id ='".$_GET['id']."'";
            $result = mysqli_query($link, $q);
            $row = mysqli_fetch_array($result);
 ?>
<script type="text/javascript">
$(function() {
        $('#gallery a').lightBox();
    });
</script>
<table width="764" border="1">
    <tr>
        <td><strong>Home Stay&nbsp;:&nbsp;<?php echo $row['home_stay_name'];?></strong></td>
    </tr>
    <tr>
        <td>ที่อยู่&nbsp;:<br/><?php echo $row['home_stay_location'];?></td>
    </tr>
    <tr>
        <td>รายละเอียด&nbsp;:<br/><?php echo $row['home_stay_detail'];?></td>
    </tr>
    <tr>
        <td>
        <div id="gallery">    
        รูปภาพ&nbsp;:<br/>
        <?php
            $q2 = "select * from picture where home_stay_id ='".$_GET['id']."'";
            $result2 = mysqli_query($link, $q2);               
            while ($row2 = mysqli_fetch_array($result2)){
                echo '<a href='.$row2["picture_address"].'><img src='.$row2["picture_address"].' width=72 height=72 alt=""/></a>&nbsp;';
            }
        ?>
        </div>
        </td>
    </tr>
</table>

